#include <iostream>
using namespace std;

int main() {
    char ch = 'M';      // char类型字面值
    int i = ch;
    cout << "The ASCII code of " << ch << " is " << i << endl;

    cout << "Add 1 to the ASCII code:" << endl;
    ch = ch + 1;
    i = ch;
    cout << "The ASCII code of " << ch << " is " << i << endl;

    // 使用cout.put输出char值
    cout << "Displaying char using a cout.put:" << endl;
    cout.put(ch);
    cout.put('!');
    cout << endl << "Done" << endl;
}
